home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / nyword22.zip / NYWHELP.ZIP / NYWHELP.16 < prev    next >
Text File  |  1986-09-29  |  2KB  |  47 lines

  1.                    SEARCH AND SUBSTITUTION COMMANDS
  2.  
  3. <+SEARCH>  (the F5 key) searches from the cursor position forwards for
  4. the specified pattern. 
  5. <-SEARCH> (SHIFT F5 key) searches backwards from the  cursor  position
  6. for the specified pattern. 
  7.     For the two commands above, you are allowed  to  put  any  regular
  8. expression  as  a  pattern.  
  9.   Regular expressions consist of the following metacharacters : 
  10.   ^  matches the beginning of a line
  11.   $  matches the end of a line
  12.   ?  matches any character
  13.   *  matches 0 or more occurences of the previous pattern
  14.   [] character class
  15.  
  16. When you invoke these commands, you will be given the previous pattern
  17. you typed in as a default. If you press <RETURN>, that pattern will be
  18. used again. (If the previous pattern shown to you ends with a '!',  it
  19. means that you wanted to ignore the case.)
  20.  
  21. <TOGGLE CASE> (the ALT F5 key) toggles case sensitivity for searching.
  22.  
  23. <+SUBST> (F6 key) searches from the cursor position forwards  for  the
  24. specified  pattern, and for each occurence of the pattern, substitutes
  25. the replacement string. 
  26. <-SUBST> (SHIFT F6 key) searches backwards from the  cursor  position,
  27. then substitutes the replacement string. 
  28.     The replacement string can have the metacharacter '&', which means
  29. to  substitute  the  matched  pattern  as part of the replacement. For
  30. instance, if your pattern to search for was 'cat', and the replacement
  31. string is 'alley&', then the word 'alleycat' will be replaced for each
  32. occurence of 'cat'.
  33.     You  are  asked  if  you want to approve each substitution. If you
  34. reply 'n', then the replacements will be made globally from the cursor
  35. position to the end (or beginning) of the file. If you reply 'y', then
  36. when the pattern is found you are asked if you  want  to  replace  it,
  37. ignore it, or stop the substitution operation totally.
  38.  
  39. <GLOBALSUB>  (the  ALT  F6  key)  allows  you to perform multiple sub-
  40. stituions at once. When you use this command, the screen  clears,  and
  41. you  are  given  a new buffer in which to enter your substitution pat-
  42. terns. Each line that you type must be of the form :
  43.   pattern=replacement
  44. where the pattern can  be  any  regular  expression.  After  you  have
  45. finished  typing  all of the substitution patterns, press <CTRL D> and
  46. the substitution operation will begin. 
  47.